/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved. distributed with this file and
 * available online at
 */
package com.lap.auth.application.job.assembler;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import com.lap.auth.application.job.command.CreateJobCmd;
import com.lap.auth.application.job.command.UpdateJobCmd;
import com.lap.auth.domain.job.Job;

@Mapper(componentModel = "spring") // , unmappedTargetPolicy = ReportingPolicy.IGNORE
public interface JobAssembler {

  @Mapping(target = "createTime", ignore = true)
  @Mapping(target = "createdBy", ignore = true)
  @Mapping(target = "updateTime", ignore = true)
  @Mapping(target = "updatedBy", ignore = true)
  @Mapping(target = "event", ignore = true)
  @Mapping(target = "id", ignore = true)
  Job toDomain(CreateJobCmd cmd);

  @Mapping(target = "createTime", ignore = true)
  @Mapping(target = "createdBy", ignore = true)
  @Mapping(target = "updateTime", ignore = true)
  @Mapping(target = "updatedBy", ignore = true)
  @Mapping(target = "event", ignore = true)
  Job toDomain(Integer id, UpdateJobCmd cmd);
}
